View Javadoc
1 package jrre.instructionset.push; 2 3 import jrre.*; 4 import jrre.types.*; 5 6 public class Dup_x1 extends jrre.instructionset.Instruction { 7 8 public Dup_x1(){ 9 10 name = "dup_x1"; 11 description = "foo foo moo poo"; 12 length = 0; 13 } 14 15 /*** 16 * Executes the <strong><code>dup_x1</code></strong> instruction. 17 * 18 * @param stackFrame 19 */ 20 public void execute(){ 21 22 Type toDup = Stack.popOperand(); 23 24 Type operandToPlaceUnder = Stack.popOperand(); 25 26 //if(jrre.JRRE.getVerbose()) 27 // System.out.println("poped in dup_x1: "+toDup); 28 29 Stack.pushOperand(toDup); 30 Stack.pushOperand(operandToPlaceUnder); 31 Stack.pushOperand(toDup); 32 33 } 34 35 public String toString(){ 36 StringBuffer toReturn = new StringBuffer(); 37 toReturn.append("dup_x1"); 38 39 return toReturn.toString(); 40 } 41 }

This page was automatically generated by Maven